describe('App.SecurityController',function(){
    var controller;

    beforeEach(function(){
        var t_alertCtrl = App.AlertController.create();
        var t_loadingCtrl = App.LoadingController.create();

        App.SecurityController.reopen({

            init:function(){
                this.set('controllers', Em.Object.create({
                    alert: t_alertCtrl,
                    loading: t_loadingCtrl
                }));
            }

        });

        controller = App.SecurityController.create();
    });
   
    it("addNavigationItems", function(){
    	spyOn(controller, 'addNavigationItems');
    	controller.addNavigationItems();
    	expect(controller.addNavigationItems).toHaveBeenCalled();
    });

    it("moveNavItems", function() {
    	var items =[{
            "title": "My Accounts",
            "link": "move",
            "className": "",
            "param": "App.OwnAccountTransfer",
            "id": "App.OwnAccountTransfer"
        }, {
            "title": "Bill Payment",
            "link": "move",
            "className": "",
            "param": "App.BillPayment",
            "id": "App.BillPayment"
        }, {
        	"title": "View and Pay Bills",
            "link": "move",
            "className": "",
            "param": "App.ViewAndPayBillPayment",
            "id": "App.ViewAndPayBillPayment"
        }, {
            "title": "Other Accounts",
            "link": "move",
            "className": "",
            "param": "App.ThirdPartyTransfer",
            "id": "App.ThirdPartyTransfer"
        }, {
            "title": "Visa Money Transfer",
            "link": "move",
            "className": "",
            "param": "App.VisaMoneyTransfer",
            "id": "App.VisaMoneyTransfer"
        }, {
            "title": "My Cards",
            "link": "move",
            "className": "",
            "param": "App.CreditCardPayment",
            "id": "App.CreditCardPayment"
        }, {
            "title": "Transfer History",
            "link": "move.transferHistory",
            "className": "",
            "param": "",
            "id": "transferHistory"
        }
        ];
        expect(JSON.stringify(controller.moveNavItems())).toBe(JSON.stringify(items));
    });

});